<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Login extends CI_Controller {
	
	public function index()
	{
		$this->load->view('login_view');
	}
	
	public function doIn()
	{
		$userId = $_POST["userId"];
		$userPs = $_POST["userPs"];
		$this->load->library("session");
		$newdata = array(
			'userId'=>$userId,
			'userPs'=>$userPs,
			'logged_in'=>TRUE
        );
		$this->session->set_userdata($newdata);
		print_r($this->session->userdata("userId"));
		print_r("<br>");
		print_r($this->session->userdata("userPs"));
		print_r("<br>");
		print_r($this->session->userdata("session"));
		print_r("<br>");
	}
	
	public function doOut()
	{
	}
	
	public function checkSession()
	{
	}
}
